﻿using Resn.WhuPub.BLL;
using Resn.WhuPub.DML;

namespace Resn.WhuPub.BLL
{
        /// <summary>
        /// 实现课本的属性和方法
        /// </summary>
        public class CourseBook : Entity<CourseBookModel>
        {
                #region 构造函数

                /// <summary>
                /// 创建课本实例
                /// </summary>
                /// <param name="model">课本模型</param>
                public CourseBook(CourseBookModel model)
                        : base(model)
                {
                }

                #endregion


                #region 属性

                #region 基本属性

               

                /// <summary>
                /// 获取课程标识
                /// </summary>
                /// <value>
                /// 课程标识
                /// </value>
                public string CourseId
                {
                        get
                        {
                                return Model.CourseId;
                        }
                }

                /// <summary>
                /// 获取书籍标识
                /// </summary>
                /// <value>
                /// 书籍标识
                /// </value>
                public string BookId
                {
                        get
                        {
                                return Model.BookId;
                        }
                }

                /// <summary>
                /// 获取或设置使用数量
                /// </summary>
                /// <value>
                /// 使用数量
                /// </value>
                public int UseAmount
                {
                        get
                        {
                                return Model.UseAmount;
                        }
                        set
                        {
                                Model.UseAmount = value;
                        }
                }

                #endregion 基本属性

                #endregion 属性

                #region 方法

                /// <summary>
                /// 获取指定标识的对象
                /// </summary>
                /// <param name="id">标识</param>
                /// <returns></returns>
                public static CourseBook Select(string id)
                {
                        return Select<CourseBook>(id);
                }

                #endregion

        }
}